<!DOCTYPE html>
<html>
<head lang="en">
  <meta charset="UTF-8">
  <title>如梦技术IT-专业的jfinal2学习培训平台</title>
</head>
<body>
<div id="test1"> 哈哈哈哈哈，我是test1</div>
<div id="test1"> 哈哈哈哈哈，我是test1</div>
<br>
<div class="test2"> 哈哈哈哈哈，我是test2</div>
<div class="test2"> 哈哈哈哈哈，我是test2</div>
<br>
<div id="test3"> 哈哈哈哈哈，我是test3</div>
<br>
<script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript">
$(function(){
	var $test1 = $("#test1");

	alert($test1);
	console.log($test1);

	var $test2 = $(".test2");
	console.log($test2);

	var test3 = document.getElementById("test3");
	console.log(test3);
	test3.style.color = "red";

	var $test3 = $("#test3");
	$test3[0].style.color = "blue";

	$(test3).click(function(e){
		alert("test3-1");
	});
	$test3.click(function(e){
		alert("test3-2");
	});
});
</script>
</body>
</html>